/**
 * Name: RESTApplication
 * Datum: 20.06.2011
 * Autor: Wilfried Karch
 * Zweck: "Hauptklasse" zum Bereitstellen des WebService.
 */

package fhj.swd09.resteasy.experiments;

import javax.ws.rs.core.Application;

import java.util.HashSet;
import java.util.Set;

public class RESTApplication extends Application
{
   private Set<Object> singletons = new HashSet<Object>();
   private Set<Class<?>> empty = new HashSet<Class<?>>();

   public RESTApplication()
   {
      singletons.add(new fhj.swd09.resteasy.experiments.exp1.FactsResource());
      singletons.add(new fhj.swd09.resteasy.experiments.exp2.FactsResource());
      singletons.add(new fhj.swd09.resteasy.experiments.exp3.FactsResource());
      
      singletons.add(new fhj.swd09.resteasy.experiments.exp4.ConverterResource());
      singletons.add(new fhj.swd09.resteasy.experiments.KelvinConverterResource());
   }

   @Override
   public Set<Class<?>> getClasses()
   {
      return empty;
   }

   @Override
   public Set<Object> getSingletons()
   {
      return singletons;
   }
}